<?php
require 'functions.php';

$session = new \Models\MySession();

$data['userGreeting'] = '';
if($_SESSION and !empty($_SESSION['userId'] )){
    try {
        $userName = Models\User::getUserName($_SESSION['userId']); 
        $data['userGreeting'] = 'Hi <b>'.$userName.'</b>';   
    } catch (Exception $exc) {
        echo $exc->getMessage();
    }
}


@$data['isLogged'] = $_SESSION['isLogged'];
$data['demoAcc'] = '<h1>Demo accounts</h1><p><b>Administrator</b> username: admin , password: pass </p>
<p><b>Registered user</b> username: tarambuka , password: pass</p>';
$data['content'] = './public_html/demo_public.php';
$data['header'] = './inc/header.php';
$data['title'] = 'Demo Accounts';
render($data, $layout);





